
/* 
定义好后,记得到serviceEnter里注册一下
*/


const {baseService2} =require('../../baseService2')
const model =require('../../../dao/model/model')
const bean =require('../../../beans/beansEnter')


/* 异常类 */
class favoriteServiceError extends Error {
    constructor(error,message='收藏异常'){
        super()
        this.error = error
        this.message=message
    }
}



class favoriteService extends baseService2{
    static ins = new favoriteService()
    constructor(){
        super(model.favoritemodel,favoriteServiceError)
    }

    static getIns (){
        if(this.ins){
            return this.ins
        }else{
            return new favoriteService()
        }
    }
}






module.exports={favoriteService}